This example resizes any image for whatever the purpose. It uses the iamge.getScaledInstance() method.

=======================================================

import java.awt.Image
// img is the image that we are resizing
// width is the width in pixels that we want the new image to be
// height is the height in pixels that we want the new image to be
// Neither width nor height can be 0, but if they are negative, then 
// one scales proportionally (meaning the picture will not be skewed.
public Image resizeImage(Image img, int width, int height) {
    return img.getScaledInstance(width, height, Image.SCALE_DEFAULT);
}